﻿<!DOCTYPE html>
<html>
<head>
	<title>锐浪HTML5报表演示 - 自由表格(FreeGrid)</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
	<script src="../grhtml5-6.6-min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function window_onload() {
            var reportViewer = rubylong.grhtml5.insertReportViewer("report_holder", "Picture.grf", "../../data/DataCenter.jsp?data=Categories"),
                report = reportViewer.report;


            report.OnInitialize = function () {
                report.ControlByName("FilePictureTitleBox").AsPictureBox.LoadFromFile("/images/Title.jpg");
                //report.ControlByName("FilePictureTitleBox").LoadFromFile(path + "Images/Title.jpg"); //不用 AsPictureBox 也是可以的
                //Report.ControlByName("URLPictureBox").AsPictureBox.LoadFromFile("PictureFromDB.jsp");

                //report.ControlByName("StaticBox1").AsTextBox.Font.Italic = true;
                //report.ControlByName("StaticBox1").AsTextBox.Text += "。。。";
                //StaticBox1
            }

            report.OnProcessRecord = function () {
                var PathFile = "/images/" + report.FieldByName("PictureFile").AsString + ".bmp";
                //Report.ControlByName("FilePictureBox").AsPictureBox.LoadFromFile(PathFile);
                report.ControlByName("FilePictureBox").LoadFromFile(PathFile);
            }

            reportViewer.start(); //启动报表运行，生成报表
        }
    </script>
</head>
<body onload="window_onload()">
    <div id="report_holder">
    </div>
</body>
</html>